using System.Collections.Generic;
using LitJson;

namespace abilities.targets
{
    public class TargetCurrent : Target
    {
        public override bool FromJson(JsonData value)
        {
            return true;
        }

        public override List<TargetObject> GetTargets(AbilityContext context)
        {
            List<TargetObject> result = null;

            if (context.AbilityManager.Owner.isDead())
            {
                return result;
            }

            TargetObject target = new TargetObject(context.AbilityManager.Owner as UnitObject);
            if (!target.unit.isDead())
            {
                result.Add(target);
            }

            return result;
        }
    }
}